package com.zhoujunlin.dorm.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName dorminfo
 */
@TableName(value ="dorminfo")
@Data
public class Dorminfo implements Serializable {
    /**
     * 
     */
    @TableId
    private String stuname;

    /**
     * 
     */
    private Date checkintime;

    /**
     * 
     */
    private String location;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Dorminfo other = (Dorminfo) that;
        return (this.getStuname() == null ? other.getStuname() == null : this.getStuname().equals(other.getStuname()))
            && (this.getCheckintime() == null ? other.getCheckintime() == null : this.getCheckintime().equals(other.getCheckintime()))
            && (this.getLocation() == null ? other.getLocation() == null : this.getLocation().equals(other.getLocation()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getStuname() == null) ? 0 : getStuname().hashCode());
        result = prime * result + ((getCheckintime() == null) ? 0 : getCheckintime().hashCode());
        result = prime * result + ((getLocation() == null) ? 0 : getLocation().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", stuname=").append(stuname);
        sb.append(", checkintime=").append(checkintime);
        sb.append(", location=").append(location);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}